package com.ruoyi.web.controller.wp;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.drug.domain.DrugsOrder;
import com.ruoyi.wp.domain.IDoctorRegister;
import com.ruoyi.wp.service.IDoctorRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/wp/doctorRegister")
public class IDoctorRegisterController extends BaseController {

    @Autowired
    private IDoctorRegisterService doctorRegisterService;

    /**
     * 患者挂号添加
     */
    //@PreAuthorize("@ss.hasPermi('system:order:add')")
    @Log(title = "挂号", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody IDoctorRegister doctorRegister) {
        return toAjax(doctorRegisterService.save(doctorRegister));
    }


}
